package com.own.component.util.excel.util.write.style.item;

import com.own.component.util.excel.util.write.style.base.AbstractStyleFunction;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.xssf.usermodel.XSSFColor;

/**
 * StyleItemFillBackgroundColor
 * <p>
 * 单元格背景色
 *
 * @author chenxueli
 * @date 2023-05-11 15:56:00
 */
public class StyleItemFillBackgroundColor extends AbstractStyleFunction<XSSFColor> {

    public StyleItemFillBackgroundColor(XSSFColor item) {
        super(item);
    }

    /**
     * 使用样式
     *
     * @param style 样式
     */
    @Override
    public void apply(CellStyle style) {
        style.setFillBackgroundColor(super.getItem());
    }

}
